package com.evil.application.pojo.dto.process;

import com.evil.application.pojo.dto.CopyApplicationDTO;
import com.evil.application.pojo.entity.ApplicationInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class CopyAppProcessReqDTO extends CopyApplicationDTO {

    /**
     * 不同版本新旧控件id
     */
    private Map<Integer, Map<Long, Long>> versionControlIdMap;

    public CopyAppProcessReqDTO(@NotNull(message = "source not null") ApplicationInfo source,
                                @NotNull(message = "target not null") ApplicationInfo target,
                                Map<Integer, Map<Long, Long>> versionControlIdMap) {
        super(source, target);
        this.versionControlIdMap = versionControlIdMap;
    }

    public CopyAppProcessReqDTO(CopyApplicationDTO copyApplicationDTO, Map<Integer, Map<Long, Long>> versionControlIdMap) {
        super(copyApplicationDTO.getSource(), copyApplicationDTO.getTarget());
        this.versionControlIdMap = versionControlIdMap;
    }
}
